Skip to content

Add dex parameter to user_fills, user_fills_by_time, meta_and_asset_ctxs - #310

Open
takinanton wants to merge 1 commit into
hyperliquid-dex:masterfrom
takinanton:add-dex-param-fills-metactxs
Open

takinanton wants to merge 1 commit into
hyperliquid-dex:masterfrom
takinanton:add-dex-param-fills-metactxs

Conversation

@takinanton

Copy link
Copy Markdown

user_state, open_orders, all_mids, and meta all take an optional dex
parameter for HIP-3 builder-deployed perp dexes. user_fills,
user_fills_by_time, and meta_and_asset_ctxs did not, so callers
tracking fills or asset metadata on a HIP-3 dex had no way to scope
the request.

This adds dex: str = "" to all three, following the exact pattern
already used elsewhere in Info, so default behavior (main dex) is
unchanged for existing callers.

Closes #278, #287

These three Info methods were the last holdouts without a dex parameter
for HIP-3 builder-deployed perp dexes, while user_state, open_orders,
all_mids, and meta already support it. Defaults to "" (the first/main
dex) so existing callers are unaffected.

Closes hyperliquid-dex#278, hyperliquid-dex#287

@koriyoshi2041 koriyoshi2041 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two parts need to be split before this is mergeable.

meta_and_asset_ctxs(dex=...) is valid and matches the documented API, but #282 already owns that exact change. More importantly, the live-endpoint verification recorded in #287 shows that userFills and userFillsByTime currently ignore dex: valid, invalid, and omitted values return the same data, while endpoints that support per-dex scoping reject an invalid dex. Exposing this parameter would therefore promise filtering the server does not provide.

Please drop the two fill-method changes and leave #278/#282 to the existing PR. If the API behavior has changed since that verification, add a current request/response receipt (including an invalid-dex control) and focused request-body tests.

@takinanton
takinanton force-pushed the add-dex-param-fills-metactxs branch from c761785 to f4fc1cc Compare November 28, 2026 05:17
@takinanton

Copy link
Copy Markdown
Author

Rechecked on mainnet today. userFills and userFillsByTime return the same 2000 fills with dex omitted, with dex xyz and with a made up dex name. clearinghouseState with that same made up dex answers 500. So you are right that the fills calls ignore dex and the param would promise filtering the server does not do. The meta_and_asset_ctxs half is the same change as #282. Nothing is left here that is not already covered so this one is superseded by #282 and can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

user_fills and user_fills_by_time missing dex parameter for HIP-3 support Info.meta_and_asset_ctxs() has no dex input

2 participants